<?php

include_once('speciallayout.class.php');
include_once('myPDO.class.php');

class SpecialLayoutDAO {

    // Création du Layout
    public function createSpecialLayout(/* GridLayout */ $specialLayout, /* myPDO */ $db) {

        try {
            $stmt = $db->prepare("INSERT INTO SpecialLayout (imgBase, Activite_idActi) VALUES (:image, :ida)");
            $image = $specialLayout->getImg();
            $id_acti = $specialLayout->getActiId();

            $stmt->bindParam(':image', $image);
            $stmt->bindParam(':ida', $id_acti);
            
            $stmt->execute();
        } catch (Exception $e) {
            echo 'Exception re�ue : ', $e->getMessage(), "\n";
        }
    }

}

?>